<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html  PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<title>S4 Frequently Asked Questions</title>
<style type="text/css">
@import url(s4.css);
</style>
</head>
<body>


<p><a href="index.html">S4 Home</a> | <a href="download.html">Download</a> | <a href="faq.html">FAQ</a> | <a href="s4_lua_api.html">Lua API</a> | <a href="dev_info.html">Developer information</a> | <a href="changelog.html">Changelog</a></p>

<h1>Frequently Asked Questions</h1>

<ul>
<li><p>What are the units?</p>

<p>S4 deals with only linear electromagnetism, so Maxwell&rsquo;s equations are
scale invariant. This means that in some sense there are no units.
To think of it a different way, you can decide that all length numbers
correspond to microns, then frequency is in units of c/microns, where c
is the speed of light, and so on.</p></li>
<li><p>What is the coordinate system?</p>

<p>All spatial coordinates are cartesian. They are not in terms of the
lattice vector basis.</p></li>
<li><p>Where is the unit cell located and do I need to define periodic copies of patterns?</p>

<p>This a tricky topic. If you use an FMM formuation which is based on
analytic Fourier transforms (which includes the default settings),
then all patterns are automatically periodized, and in some sense,
the shape and location of the unit cell is irrelevant. For spatially
sampled FMM formulations (those that rely on an FFT), the unit cell
is the Wigner-Seitz cell centered at the origin. For these formulations
you need to specify periodic copies.</p>

<p>You should always check that the patterning is specified correctly
using GetEpsilon() or OutputLayerPatternRealization().</p></li>
<li><p>What happens if I get a quantity &ldquo;outside&rdquo; the structure?</p>

<p>For example, if you specify a negative z coordinate, that corresponds
to being within the first layer, since it is assumed the first layer
extends infinitely towards negative infinity in the z direction.
Similarly, if you specify a z coordinate past the total thickness of
all layers, it is within the last layer. This is why you can specify
zero thickness for the first and last layers.</p></li>
<li><p>How do I specify frequency dependent material parameters?</p>

<p>If you have a loop iterating over frequencies, then within the loop
simply set new epsilon values for the materials. In order to incorporate
values from tabulated data, you can use the Interpolator object and
pass it a table of values. Large tables can be defined in separate
files and included using the Lua dofile() function.</p></li>
<li><p>Why is the POVRay output wrong?</p>

<p>The POVRay feature is only to provide a starting point for writing
an actual POVRay script. It is not guaranteed to be correct. You
should not rely on this feature.</p></li>
</ul>

</body>
</html>
